/*
 * @Descripttion: 
 * @version: 
 * @Author: yuanliutech
 * @Date: 2022-10-31 15:27:59
 * @LastEditors: yuanliutech@lwj
 * @LastEditTime: 2022-11-16 14:59:43
 */

// 显示信息
const showMsg = (title, icon = 'none', duration = 2000) => {
  return wx.showToast({
    title,
    icon,
    duration,
  })
}

// 显示弹窗确认按钮
const showModel = (title, content, callback) => {
  return wx.showModal({
    title: title,
    content: content,
    success(res) {
      if (res.confirm) {
        callback(true)
      } else if (res.cancel) {
        callback(false)
      }
    }
  })
}

module.exports = {
  showMsg,
  showModel
}